#import "WWGameView.h"

@implementation WWGameView

- (id)initWithFrame:(NSRect)frameRect
{
	if ((self = [super initWithFrame:frameRect]) != nil) {
		// get the png graphics out of the application bundle and load them into the button image instance variables.
		previousButton = [[NSImage alloc] initWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"previous.png"]];
		nextButton = [[NSImage alloc] initWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"next.png"]];
		cancelButton = [[NSImage alloc] initWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"cancelQuit.png"]];
		
		
	}
	return self;
}

- (void)drawRect:(NSRect)rect
{
	NSRect bounds = [self bounds];
	[[NSColor whiteColor] set];
	[NSBezierPath fillRect:bounds];
	[[NSColor blueColor] set];
	[NSBezierPath strokeRect:bounds];
	NSRect previousButtonRect;
	NSRect previousButtonImageRect;
	previousButtonRect = [self bounds];
	//previousButtonImageRect.origin.x = NSZeroPoint;
	previousButtonImageRect.size = [previousButton size];
	NSPoint prevPoint;
	prevPoint.x=0;
	prevPoint.y=0;
	[previousButton drawAtPoint:prevPoint fromRect:previousButtonImageRect operation:NSCompositeSourceOver fraction:1.0];
//	[previousButton drawInRect:previousButtonRect fromRect:previousButtonImageRect operation:NSCompositeSourceOver fraction:1.0];
}

- (void) mouseDown:(NSEvent *)theEvent{
	NSLog(@"Mouse Down: %@", theEvent);
}

#pragma mark Images
-(void)setImage1:(NSImage *)newImage{
	
}

@end
